home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-03-09 | 928 b | 38 lines | [TEXT/GEOL] |
- Item 5139978 5-March-90 17:09PST
-
- From: D1165 Esha, David C Hands,PRT
-
- To: D5780 Stat-Ease, Robert Altman,PRT
-
- cc: MACAPP.TECH$ MacApp Technical
-
- Sub: Re: Cancelling a New Document
-
-
- If you post a dialog in DoInitialState and the user cancels… Then install an
- error handler to "fail silently" and exit the dialog. Something like this:
-
- PROCEDURE TDoc.DoInitialState; OVERRIDE;
-
- PROCEDURE HandleCnclErr(err: OSerr; msg: LONGINT);
- BEGIN
- aWindow.Close; {or aDialog.Close}
- END;
-
- BEGIN
- {…code for creating aWindow view and finding aDialog subview…}
- CatchFailures(fi, HandleCnclErr);
- diss := aDialog.poseModally;
- IF diss = 'cncl' THEN
- failure(noErr, 0) {fail silently}
- ELSE BEGIN
- END;
- aWindow.Close;
- Success(fi);
- END;
-
-
- David Hands
- ESHA Research
-
-